function buttonOver()
{
	var sb = document.getElementById("searchButton");
	sb.style.backgroundImage='url(img/search2.jpg)';   
}
function buttonOut()
{
	var sb = document.getElementById("searchButton");
	sb.style.backgroundImage='url(img/search1.jpg)';   
}
//打开添加新bug div
function openNewBug()
{
	Element.show("mask");
	Effect.SlideDown('addBug',{duration:1.0});
	$('addBugResult').innerHTML="";
	$('bugName').value="";
	
}
//创建自动完成
function autoComplete()
{
	new Ajax.Autocompleter(
		"searchContent",
		"autocomplete_choices",
		"autoCompuleter.laborc",{
		}
		);
}
//创建新的bug
function addNewBug()
{
	var bugName=document.getElementById('bugName').value;
	var params='bugName=' + bugName ;
	var myAjax = new Ajax.Request(
		'addBug.laborc',
		{
			method:'post',
			parameters:params,
			onComplete:addNewBugResult
		}
	);
}
function addNewBugResult(response){
	$('addBugResult').innerHTML=response.responseText;
}
//搜索bug
function searchBug()
{
	var bugName=document.getElementById('searchContent').value;
	var params='bugName=' + bugName ;
	var myAjax = new Ajax.Request(
		'searchBug.laborc',
		{
			method:'post',
			parameters:params,
			onComplete:searchBugResult
		}
	);
}
function searchBugResult(response){
	$('content').innerHTML=response.responseText;
}
//查看bug
function showBug(id)
{
	Element.show("mask");
	Effect.SlideDown('showBug',{duration:1.0});
}